nums = [4,3,2,7,8,2,3,1]
def findDisappearedNumbers(nums):
    state=[False for _ in range(len(nums)+1)]
    state[0]=True
    for i in nums:
        state[i]=True
    ans=[]
    for i in range(len(state)):
        if not state[i]:
            ans.append(i)
    return ans
print(findDisappearedNumbers(nums))